<?php if (!defined('THINK_PATH')) exit();?><!DOCTYPE html>
<html>
<head>
    <title></title>
    <meta charset="UTF-8">
    <link rel="stylesheet" type="text/css" href="/End/Public/Admin/Css/bootstrap.css" />
    <link rel="stylesheet" type="text/css" href="/End/Public/Admin/Css/bootstrap-responsive.css" />
    <link rel="stylesheet" type="text/css" href="/End/Public/Admin/Css/style.css" />
    <script type="text/javascript" src="/End/Public/Admin/Js/jquery.js"></script>
    <script type="text/javascript" src="/End/Public/Admin/Js/jquery.sorted.js"></script>
    <script type="text/javascript" src="/End/Public/Admin/Js/bootstrap.js"></script>
    <script type="text/javascript" src="/End/Public/Admin/Js/ckform.js"></script>
    <script type="text/javascript" src="/End/Public/Admin/Js/common.js"></script>

 

    <style type="text/css">
        body {
            padding-bottom: 40px;
        }
        .sidebar-nav {
            padding: 9px 0;
        }

        @media (max-width: 980px) {
            /* Enable use of floated navbar text */
            .navbar-text.pull-right {
                float: none;
                padding-left: 5px;
                padding-right: 5px;
            }
        }


    </style>
</head>
<body>
<form action="<?php echo U('Admin/index/handleadduser','','');?>" method="post" class="definewidth m20">
<table class="table table-bordered table-hover definewidth m10">
    <tr>
        <td width="10%" class="tableleft">账号</td>
        <td><input class="text" type="text" name="account"/></td>
    </tr>
    <tr>
        <td class="tableleft">密码</td>
        <td><input class="text" type="text" name="password"/></td>
    </tr>
    <tr>
        <td class="tableleft">用户名</td>
        <td><input class="text" type="text" name="username"/></td>
    </tr>
    <tr>
        <td class="tableleft">邮箱</td>
        <td><input class="text" type="text" name="email"/></td>
    </tr>
    <tr>
        <td class="tableleft">状态</td>
        <td>
            <input type="radio" name="status" value="1" checked/> 启用
           <input type="radio" name="status" value="0"/> 禁用
        </td>
    </tr>
    <tr>
        <td class="tableleft">角色</td>
        <td>
            <select name="role_id">
                <?php if(is_array($roleInfo)): foreach($roleInfo as $key=>$vo): ?><option  value ="<?php echo ($vo["role_id"]); ?>"><?php echo ($vo["role_name"]); ?></option><?php endforeach; endif; ?>
            </select>
        </td>
    </tr>
    <tr>
        <td class="tableleft"></td>
        <td>
            <button type="submit" class="btn btn-primary" type="button" id="s_btn">保存</button> &nbsp;&nbsp;<button type="button" class="btn btn-success" name="backid" id="backid">返回列表</button>
        </td>
    </tr>
</table>
</form>
</body>
</html>
<script>
    $(function () {       
		$('#backid').click(function(){
				window.location.href="<?php echo U('indexuser');?>";
		 });
        //button 提交非空验证
        $('#s_btn').click(function(){
            var flag=0;
            $(".text").each(function(){
                if($(this).val() == ''){
                    flag=1;
                    $(this).focus();
                }});
            if(flag==1){
                alert("内容不能为空！");
                return false;
            }
        });

    });
</script>